<include file="Public/header"/> 
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">幻灯片管理</h3>
                   <div class="box-tools pull-right">
                        <a href="#" class="btn btn-sm btn-primary" data-target="#user" data-toggle="modal" >添加用户</a>
                    </div>
            <!--modal start-->
        <div class="modal fade" id="user">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title"> 添加用户</h4>
                    </div>
                    <form role="form" method="post" action="__APP__/Home/Users/add">
                        <div class="modal-body">
                             <div class="form-group">
                                <label style="text-align: left">用户名</label>
                                <input type="text" id="username" class="form-control" name="username">
                            </div>
                            <div class="form-group">
                                <label style="text-align: left">密码</label>
                                <input type="password" id="password" class="form-control" name="password">
                            </div>
                            <div class="form-group">
                                <label style="text-align: left">确认密码</label>
                                <input type="password" id="password_confirmation" class="form-control" name="password_confirmation">
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
                            <button type="submit" class="btn btn-primary" id = "click">保存</button>
                        </div>
                    </form>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>
        <!--modal end-->


                </div><!-- /.box-header -->
                <div class="box-body">
                    <table id="example2" class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th># </th>
                            <th>用户名</th>
                            <th>注册时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                          <volist name="list" id="vo">
                            <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.date}</td>
                            <td>
                                <span class="span-container"><a href="" data-id="{$vo.id}" data-target="#passworda" data-toggle="modal" id="edit-passwordd" >修改密码</a></span>
                            </td>
                        </tr>
                        </volist>
                         </tbody>
                    </table>
                </div><!-- /.box-body -->
            </div><!-- /.box -->

        </div>
    </div>
            <!--modal start-->
        <div class="modal fade" id="passworda">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title"> 修改密码</h4>
                    </div>
                    <form role="form" method="post" action="__APP__/Home/Users/user_password">
                    <input type="hidden" name="user_id" id="user_id" value="">
                        <div class="modal-body">
                            <div class="form-group">
                                <label style="text-align: left">新密码</label>
                                <input type="password" id="password" class="form-control" name="password">
                            </div>
                            <div class="form-group">
                                <label style="text-align: left">确认密码</label>
                                <input type="password" id="password_confirmation" class="form-control" name="password_confirmation">
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
                            <button type="submit" class="btn btn-primary" id = "click">保存</button>
                        </div>
                    </form>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>
        <!--modal end-->

</section>

      </div><!-- /.content-wrapper -->
        <footer class="main-footer">
            <strong>Copyright &copy; 2016 佳禾.</strong> All rights reserved.
        </footer>

      <!-- Add the sidebar's background. This div must be placed
           immediately after the control sidebar -->
      <div class="control-sidebar-bg"></div>
    </div><!-- ./wrapper -->
    <!--提示-->
<style>
    .layout_container {
        width: 100%;
        position: fixed;
        top: 50px;
        text-align: center;
        transform: translate(0,-50px);
        z-index: 20000;
    }

    .pop_container {
        display: inline-block;
        padding: 10px 40px;
        background: #ff0000;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        transform: translate(0,0);
        -moz-box-shadow:0px 0px 13px #333333;
        -webkit-box-shadow:0px 0px 13px #333333;
        box-shadow:0px 0px 13px #333333;
    }

    .pop_container p {
        padding: 0;
        margin: 0;
        color: #fff;
        font-weight: 600;
    }
</style>
<script>
    $('#edit-passwordd').live("click",function(){
        var id = $(this).attr('data-id');
        alert(id);
        $('#user_id').attr('value',id);
    });
</script>


    <script src="__PUBLIC__/lib/js/jquery-ui.min.js"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
      $.widget.bridge('uibutton', $.ui.button);
    </script>
    <!-- Bootstrap 3.3.5 -->
    <script src="__PUBLIC__/lib/js/bootstrap.min.js"></script>
    <!-- Morris.js charts -->
    <script src="__PUBLIC__/lib/js/raphael-min.js"></script>
        <!-- Sparkline -->
    <script src="__PUBLIC__/lib/js/jquery.sparkline.min.js"></script>
    <!-- jvectormap -->
    <script src="__PUBLIC__/lib/js/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="__PUBLIC__/lib/js/jquery-jvectormap-world-mill-en.js"></script>
    <!-- jQuery Knob Chart -->
    <script src="__PUBLIC__/lib/js/jquery.knob.js"></script>
    <!-- daterangepicker -->
    <script src="__PUBLIC__/lib/js/moment.min.js"></script>
    <script src="__PUBLIC__/lib/js/daterangepicker.js"></script>
    <!-- datepicker -->
    <script src="__PUBLIC__/lib/js/bootstrap-datepicker.js"></script>
    <!-- Bootstrap WYSIHTML5 -->
    <script src="__PUBLIC__/lib/js/bootstrap3-wysihtml5.all.min.js"></script>
    <!-- Slimscroll -->
    <script src="__PUBLIC__/lib/js/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="__PUBLIC__/lib/js/fastclick.min.js"></script>
    <!-- AdminLTE App -->
    <script src="__PUBLIC__/lib/js/app.min.js"></script>
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
    <script src="__PUBLIC__/lib/js/dashboard.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="__PUBLIC__/lib/js/demo.js"></script>
  </body>
</html>
